<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2025-02-28
  Time: 19:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table>
    <tr>
        <td>图书名称</td>
        <td><input type="text" name="name" value="${bookManage.name}"></td>
    </tr>
    <tr>
        <td>图书作者</td>
        <td><input type="text" name="author" value="${bookManage.author}"></td>
    </tr>
    <tr>
        <td>购买时间</td>
        <td>
            <c:choose>
                <c:when test="${not empty bookManage.time}">
                    <input type="text"
                           value="<fmt:formatDate value="${bookManage.time}" pattern="yyyy-MM-dd"/>">
                </c:when>
            </c:choose>
        </td>
    </tr>
    <tr>
        <td>类别</td>
        <td>
            <input type="text" readonly
                   value="${bookManage.type == 1? '计算机/软件' : (bookManage.type == 2? '小说/文摘' : (bookManage.type == 3? '杂项' : ''))}">
        </td>
    </tr>
</table>
</body>
</html>
